<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
	<style type="text/css">
		#box{
			position: absolute;
			left: 0px;
			height: 0px;
			width: 200px;
			height: 200px;
			
		}
		#box2{
			position: absolute;
			right: 1000px;
			width: 100px;
			height: 100px;
		}

	</style>
	<script type="text/javascript">
		window.onload=function  () {
			var box = document.getElementById('box');
			var box2=document.getElementById('box2');
			var top =0;
			right=0;
			
			var c = 1;

			var run = function run(){
				if(c==1){
					top +=10;
					right +=110;
				
					
				}else{
					top -=10;
					right-=10;
					
				
				}

				if(top>1000){
					c=0;
				}else if(top<0){
					c=1;
				}
				
				box.style.top=top+'px';
				box2.style.right=right+'px';
			
				
			}
			
			setInterval(run, 10);

		}



	</script>

</head>
<body>

<div id="box">
<img src="./images/1.gif" alt="">
	
</div>
<div id="box2">
	<img src="" ./images/2.gif alt="">
</div>
	
</body>
	
</html>